#ifndef RSIM_STATEREPORTER_H
#define RSIM_STATEREPORTER_H

/* -------------------------------------------------------------------------- *
 * File: StateReporter.h                                                      *
 * Authors: Kishor Bhalerao                                                   *
 * Email : kishor8dm@gmail.com                                                *
 * Contributors:                                                              *
 * Email:                                                                     *
 * copyright (c) 2010 Authors.                                                *
 *                                                                            *
 * This program is free software: you can redistribute it and/or modify it    *
 * under the terms of the GNU General Public License as published by the Free *
 * Software Foundation, either version 3 of the License, or any later version.*
 *                                                                            *
 * This program is distributed in the hope that it will be useful, but        *
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   *
 * for more details. (http://www.gnu.org/licenses/)                           *
 * -------------------------------------------------------------------------- */

#include "Reporter.h"
#include <fstream>

namespace RSIM{

class SystemData;
        
/** This writes the state vector of the system [q,u]' every report_interval */
class StateReporter:public Reporter{
        public:
                /** 
                @param report_interval is the time interval at which the function Reporter::report() is called by the integrator
                @param opfile is the file in which the state vector of the system is written every report_interval */
                StateReporter(  const SystemData& Data, 
                                const double& report_interval,
                                std::fstream& opfile);
                
                void report()const;
                
        private:
                std::fstream& OpFile_;
};

}

#endif